<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:lang-xmllang="en">
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .large-font {
            font-size: 20pt;
            color: aqua;
        }
    </style>
</head>
<body>
    <h1>使用th:attr设置任意属性值</h1>
    <form action="/hello.html" method="post" th:attr="action=${myAction}">
        账号：<input type="text" name="username" id="username"><br>
        密码：<input type="text" name="pwd" id="pwd"><br>
      <input type="submit" value="登录" th:attr="value=${myText}, onclick='func1()'">
    </form>
    <hr>
    <form th:action="@{/user/list}" method="get">
        username:<input type="text" name="username" value=""><br>
        password:<input type="password" name="pwd" value=""><br>
        <input type="submit" th:value="${myText}">
    </form>
    <hr>
    <a th:href="@{/hello.html}" th:class="large-font">链接地址</a>
    <hr>
    <img th:src="@{/images/ex.png}" th:alt-title="我的图片">
    <hr>
    <input type="checkbox" value="swimming" th:checked="${checked}">游泳 <br>
    <input type="checkbox" value="cycle" th:checked="${unchecked}">骑行
    <script>
        function func1() {
            alert("button click");
        }
    </script>
</body>
</html>